package fhp.hlhj.giantfold.fragment

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import fhp.hlhj.giantfold.R
import fhp.hlhj.giantfold.interfaces.IMyfans
import fhp.hlhj.giantfold.adapter.MyFansListAdp
import fhp.hlhj.giantfold.presenter.MyFansPresenter
import kotlinx.android.synthetic.main.myfans_fgm.view.*

/**
 * author: FHP
 * data: on 2018\1\5 0005 16:01
 * E-Mail: 103945089@qq.com
 */
class MyFansFgm :Fragment(), IMyfans {
    private lateinit var rootView:View
    private lateinit var adp:MyFansListAdp
    private lateinit var myfansPresenter:MyFansPresenter
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        rootView=inflater.inflate(R.layout.myfans_fgm,null)
        myfansPresenter= MyFansPresenter(this)
        intList()
        return rootView
    }
    private fun intList() {
        myfansPresenter.getFans()

    }
    override fun getFasn(datas: List<String>) {
        adp=MyFansListAdp(context,datas)
        rootView.listView.adapter=adp
    }
    override fun exit() {

    }
}